﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Bank_Account
{
    class Account
    {
        private static int accountCount;
        private string firstName;
        private string lastName;
        private int accountNumber;
        private int sumMoney;

        public string FirstName
        {
            get
            {
                return firstName;
            }
            set
            {
                firstName = value;
            }
        }
        public string LastName
        {
            get
            {
                return lastName;
            }
            set
            {
                LastName = value;
            }
        }
        public int AccountNumber
        {
            get
            {
                return accountNumber;
            }
            set
            {
                accountNumber = value;
            }
        }
        public int SumMoney
        {
            get
            {
                return sumMoney;
            }
            set
            {
                sumMoney = value;
            }
        }



        public void PrintAccountInfoToConsole()

        {
            Console.WriteLine("First name: {0}, lastname: {1}, accountNumber: {2}, sumMoney: {3} ", firstName, lastName, accountNumber, sumMoney);

        }

        public static Account GenerateRandomAccount()
        {
            accountCount++;
            Account account = new Account();
            account.FirstName = "Vasya"+ accountCount.ToString();
            account.LastName = "Pupkin" + accountCount.ToString();
            account.AccountNumber = accountCount;

            //  customer.sumCash = Customer.rndGenerator.Next(0, 1000));

            return account;
        }

        //public static Random rndGenerator = new Random();


    }



}

